@extends('default.mobile.layouts.companyPublic')
@section('title','职位管理-'.Site::get('webname'))
{{--首页css--}}
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/mobile/company/common.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/mobile/company/job_manage.css')}}">
@endsection
{{--头部标签--}}
@section('tag','职位管理')
@section('link') href="{{url('mobile/company/welcome')}}" @endsection

{{--主体内容--}}
@section('content')
    <!-- B 职位管理-->
    <div class="list_box">
        <ul class="menu">
            <li class="on"><a href="{{url('mobile/company/jobadmin')}}">职位管理</a></li>
            <li><a href="{{url('mobile/company/browse_job')}}">谁浏览过我的职位</a></li>
        </ul>
    </div>
    <!-- 职位管理 -->
    @if(count($joblist) > 0)
        @foreach($joblist as $v)
            <div class="job_box">
                <div class="job_info">
                    <a href="{{url('mobile/jobinfo_'.idEncryption($v->id).'.html')}}">
                        <dl>
                            <dt>
                                <span class="title"><span class="job_title">{{$v->job_title}}</span>@if($v->iurgent==1)<i></i>@endif</span>
                                @if($v->job_status  == 1)
                                    <span class="job_status release">发布中</span>
                                @elseif($v->job_status  == 2)
                                    <span class="job_status shield">屏蔽的</span>
                                @elseif($v->job_status  == 0)
                                    <span class="job_status audit">审核中</span>
                                @elseif($v->job_status  == 7)
                                    <span class="job_status audit">冻结中</span>
                                @endif
                            </dt>
                            <dd>
                                <span class="money">@if($v->salary_above){{$v->salary_above}}-{{$v->salary_below}}元@else面议@endif</span>
                            </dd>
                            <dd>
                                @if($v->location1)
                                    <span class="default">{{$v->location1}}</span>
                                @endif
                                @if($v->education)
                                        <b>|</b><span class="default">{{$v->education}}</span>
                                @endif
                                @if($v->work_year)
                                        <b>|</b><span class="default">{{$v->work_year}}</span>
                                @endif
                            </dd>
                        </dl>
                    </a>
                </div>
                <div class="operation">
                    <ul>
                        <li><a href="{{url('mobile/company/job/'.$v->id.'/edit')}}">编辑</a></li>
                        <li><a href="{{url('mobile/company/job/'.$v->id.'/edit?type=publish')}}">克隆</a></li>
                        <li><a onclick="destroy('{{url('mobile/company/urgent')}}?id={{$v->id}}','您真的要加急这个职位吗?加急将消耗10个积分?')">加急</a></li>
                        <li><a onclick="job_status('{{url('mobile/company/job_status')}}?id={{$v->id}}')">更多</a></li>
                    </ul>
                </div>
            </div>
        @endforeach
    @else
        <div class="list_empty">
            <span class="norecord"></span>
            <span class="sorry">抱歉，没有找到相关职位！</span>
        </div>
    @endif
    <!-- 职位记录 -->

    <!-- B分页 -->
    <div class="page">
        @if($joblist->currentPage() <= 1)
            <a class="btn_gary previous ">上一页</a>
        @else
            <a href="{{$joblist->previousPageUrl()}}" class="previous">上一页</a>
        @endif
        <span><em>{{$joblist->currentPage()}}</em>/{{$joblist->lastPage()}}</span>
        @if($joblist->currentPage()  ==  $joblist->lastPage())
            <a class="next btn_gary">下一页</a>
        @else
            <a href="{{$joblist->nextPageUrl()}}" class="next">下一页</a>
        @endif
    </div>
    <!-- E分页 -->

    {{--发布职位--}}
    <div class="btn_release">
        <div class="btn">
            <a href="{{url('mobile/company/jobpublish')}}">发布职位</a>
        </div>
    </div>
@endsection

@section('footerjs')
    @parent
    <script>var _token = '{{csrf_token()}}';</script>
    <script type="text/javascript" src="{{asset('/default/js/mobile/company/post_manage.js')}}"></script>
@endsection